home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / share / doc / xfonts-bolkhov-koi8r-misc / mk8859alias.pl < prev    next >
Encoding:
Perl Script  |  2000-01-26  |  564 b   |  35 lines

  1. #!/usr/bin/perl -w
  2.  
  3. #
  4. #  mk8859alias.pl
  5. #      Generates font aliases with rgstry-encdng set to "iso8859-1".
  6. #      The fndry has original encoding appended (e.g. "adobe"->"adobe_koi8_1")
  7. #
  8. #  Usage:
  9. #      mk8859alias.pl <fonts.dir >>fonts.alias
  10. #
  11.  
  12. use strict;
  13.  
  14. my $l;
  15. my $f;
  16. my $a;
  17.  
  18. <STDIN>; # Skip the number of fonts
  19.  
  20. print "!ENC: 8859-1\n";
  21.  
  22. while (<STDIN>)
  23. {
  24.     $l = $_;
  25.     $l =~ /^.+?\s+(.*)$/;
  26.  
  27.     $f = $1;
  28.     $f =~ /^(-.*?)(-.*?-.*?-.*?-.*?-.*?-.*?-.*?-.*?-.*?-.*?-.*?-)(.*?)-(.*?)$/;
  29.  
  30.     $a = "$1_$3_$4$2iso8859-1";
  31.  
  32.     print "\"$a\" \"$f\"\n";
  33.  
  34. }
  35.